package ltd.dujiabao.capability.common.domain;

import java.time.LocalDateTime;

/**
 * @author : DuJiabao
 * @Project : ddd-capability
 * @Time : 2024/4/6 21:35
 * @Desc :
 */
public abstract class AggregateRoot extends AuditableEntity {
    private Long version;

    public AggregateRoot(LocalDateTime createdAt, Long createdBy) {
        super(createdAt, createdBy);
    }

    public Long getVersion() {
        return version;
    }

    public Long incrementAndGetVersion() {
        return version + 1;
    }
}
